<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<f:loadBundle basename="demo.bundle.Messages" var="msg"/>

<html>
<head>
<title>Semantic CBR Code Search</title> 
<style type="text/css">
.odd-row {
    background-color: #ECF3FE;
}
.even-row {
    background-color: #FCFFFE;
}
.active-row {
    background-color: #FFEBDA;
}

.cell { 
	width: 200px;
	vertical-align:top;
}

.rsTitle { 
	padding: 5px;

	font-weight: bold;
	font-variant: small-caps;

	background-color: #E0ECF8;
	background-repeat: repeat-x;
	background-position: center;
}

.rsPanel {
	top: auto;
}

.rsLabel {
	font-size: 12px;
}

.rsInput {
	size: 220px;
	border-style: solid;
	border-width: 1px;
}

.rsButton {
	border-width: 2px;
	border-style: outset; 
	vertical-align: middle;
}

</style>
</head>
<body>
<f:subview id="projectDataForm">
	<a4j:form>
		<rich:panel>
			<h:panelGrid columns="2" width="100%">
				<!-- columna izquierda -->
				<h:panelGrid columns="1" width="90%">
					<rich:simpleTogglePanel id="togglePanelRespository" switchType="client" label="#{msg.dlForm_tgPanel_repository_label}" width="60%" >
						<h:panelGrid styleClass="rsTitle" columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cName}" />
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cValue}" />
							<h:outputText/>
						</h:panelGrid>
						<rich:separator height="1" lineType="solid"/><br/>
						<h:panelGrid columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_rProtocol}" for="rProtocol" />
							<rich:comboBox width="160px" id="rProtocol" value="#{projectBean.repository.repository_protocol}">
								<f:selectItems value="#{projectBean.repositoryProtocolList}"/>
							</rich:comboBox>
							<h:outputText/>
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_rServer}" for="rServer" />
							<h:inputText id="rServer" value="#{projectBean.repository.repository_server}" />
							<rich:message for="rServer" />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_rUsr}" for="rUser" />
							<h:inputText id="rUser" value="#{projectBean.repository.repository_user}" />
							<rich:message for="rUser" />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_rPass}" for="rPass" />
							<h:inputSecret id="rPass" value="#{projectBean.repository.repository_password}" />
							<rich:message for="rPass" />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_rUrl}" for="rUrl" />
							<h:inputText id="rUrl" value="#{projectBean.repository.repository_name}" />
							<rich:message for="rUrl" />
						</h:panelGrid>
					</rich:simpleTogglePanel>
					
					<rich:simpleTogglePanel id="togglePanelProject" switchType="client" label="#{msg.dlForm_tgPanel_project_label}" width="60%" >
						<h:panelGrid styleClass="rsTitle" columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cName}" />
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cValue}" />
							<h:outputText/>
						</h:panelGrid>
						<rich:separator height="1" lineType="solid"/><br/>
						<h:panelGrid columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_pName}" for="pName" />
							<h:inputText id="pName" value="#{projectBean.project.project_name}" />
							<rich:message for="pName" />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_pDate}" for="pDate" />
							<rich:calendar id="pDate" value="#{projectBean.project.project_date}" />
							<rich:message for="pDate" />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_pState}" for="pState" />
							<rich:comboBox width="160px" id="pState" value="#{projectBean.project.project_state}">
								<f:selectItems value="#{projectBean.projectStateList}"/>
							</rich:comboBox>
							<rich:message for="pState" />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_pExpert}" for="pExpert" />
							<h:inputText id="pExpert" value="#{projectBean.project.project_expert}" />
							<rich:message for="pExpert" />
						</h:panelGrid>
					</rich:simpleTogglePanel>
					
					<rich:simpleTogglePanel id="togglePanelClient" switchType="client" label="#{msg.dlForm_tgPanel_client_label}" width="60%" opened="false" >
						<h:panelGrid styleClass="rsTitle" columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cName}" />
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cValue}" />
							<h:outputText/>
						</h:panelGrid>
						<rich:separator height="1" lineType="solid"/><br/>
						<h:panelGrid columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_mClient}" for="mClient" />
							<h:inputText id="mClient" value="#{projectBean.clientName}" />
							<h:outputText />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_mRubro}" for="mRubro" />
							<h:inputText id="mRubro" value="#{projectBean.clientBiz}" />
							<h:outputText />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_mUsrQty}" for="mUsrQty" />
							<h:inputText id="mUsrQty" value="#{projectBean.clientUsrQty}" />
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_mUsrQtySufix}"/>
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_mTxQty}" for="mTxQty" />
							<h:inputText id="mTxQty" value="#{projectBean.clientTxQty}" />
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_mTxQtySufix}"/>
						</h:panelGrid>
					</rich:simpleTogglePanel>
		
					<rich:simpleTogglePanel id="togglePanelTecn" switchType="client" label="#{msg.dlForm_tgPanel_tecn_label}" width="60%" opened="false" >
						<h:panelGrid styleClass="rsTitle" columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cName}" />
							<h:outputText styleClass="rsLabel" value="#{msg.dlForm_label_cValue}" />
							<h:outputText/>
						</h:panelGrid>
						<rich:separator height="1" lineType="solid"/><br/>
						<h:panelGrid columns="3" columnClasses="cell, cell, cell" width="100%">
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_tStandard}" for="tStandard" />
							<h:inputText id="tStandard" value="#{projectBean.tecnicalStandard}" />
							<h:outputText />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_tJVM}" for="tJVM" />
							<h:inputText id="tJVM" value="#{projectBean.tecnicalJVM}" />
							<h:outputText />
		
							<h:outputLabel styleClass="rsLabel" value="#{msg.dlForm_label_tFwk}" for="tFwk" />
							<h:inputText id="tFwk" value="#{projectBean.tecnicalFwk}" />
							<h:outputText />
						</h:panelGrid>
					</rich:simpleTogglePanel>
				</h:panelGrid>
				<!-- columna derecha -->
				<h:panelGrid columns="1" width="10%">
					<a4j:commandButton id="botonDescargar" styleClass="rsButton" value="#{msg.pdForm_button_download}" action="#{projectBean.download}" />
					<a4j:commandButton id="botonLimpiar" styleClass="rsButton" value="#{msg.pdForm_button_clean}" action="#{projectBean.clean}" type="reset" />
					<a4j:commandButton id="botonSalir" styleClass="rsButton" value="#{msg.pdForm_button_exit}" action="#{projectBean.exit}" />
				</h:panelGrid>
			</h:panelGrid>
		</rich:panel>
	</a4j:form>
</f:subview>
</body>
</html>
